package com.glamour.hlcity.component.framework.obse;
import java.util.Observable;
import com.glamour.hlcity.component.framework.common.NotifyEnum;
import com.glamour.hlcity.component.framework.common.NotifyObject;
import com.glamour.hlcity.component.framework.factory.FrameworkFactory;

public abstract class AbstractObservable extends Observable  {
	protected FrameworkFactory frameworkFactory;
	

	public void setFrameworkFactory(FrameworkFactory frameworkFactory) {
		this.frameworkFactory = frameworkFactory;
	}

	public AbstractObservable() {
		
	}

	/**
	 * 事件触发
	 * @param event
	 * @param notifyObj
	 */
	public void fireEvent(NotifyEnum event,NotifyObject notifyObj){
		//如果该值为空，则加载
		if(notifyObj.geNotifyEnum()==null){
			notifyObj.setNotifyEnum(event);
		}
		this.setChanged();
		this.notifyObservers(notifyObj);
	}
	
	
	
	/**
	 * 监听者列表
	 */
	public abstract void addObservers();
}
